package com.kakaxi.mybilibili.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kakaxi.mybilibili.R;
import com.kakaxi.mybilibili.bean.LiveRoomMedalRankItemBean;

import java.util.List;

/**
 * 直播间粉丝榜适配器
 * Created by kakaxi on 16/11/9.
 */

public class LiveRoomMedalRankRecyAdapter extends BaseQuickAdapter<LiveRoomMedalRankItemBean,
        BaseViewHolder> {

    public LiveRoomMedalRankRecyAdapter(List<LiveRoomMedalRankItemBean> data) {
        super(R.layout.item_recy_live_room_medal_rank, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, LiveRoomMedalRankItemBean
            liveRoomMedalRankItemBean) {
        baseViewHolder.setText(R.id.txt_live_room_medal_rank_no, baseViewHolder
                .getAdapterPosition() + 1 + "")
                .setText(R.id.txt_live_room_medal_rank_level, liveRoomMedalRankItemBean
                        .getMedalName() + ":" + liveRoomMedalRankItemBean.getLevel()).setText(R
                .id.txt_live_room_medal_rank_name, liveRoomMedalRankItemBean.getUname());
    }
}
